package com.sky.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.po.CategoryPO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CategoryRepository extends BaseMapper<CategoryPO> {

    /**
     * 分页查询
     * @param categoryPageQueryDTO
     * @return
     */
    Page<CategoryPO> pageQuery(@Param("page")Page<CategoryPO> page,@Param("source")CategoryPageQueryDTO categoryPageQueryDTO);

    List<CategoryPO> selectByType(@Param("type")Integer type);
}
